#ifndef _STDLIBPATCH_INTERNAL_H_
#define _STDLIBPATCH_INTERNAL_H_

//#ifdef __cplusplus
//extern "C"{
//#endif



#include "stdlibpatch.h"

struct slist_t {
        size_t  size;                   /**< length of sequence */
        size_t  capacity;               /**< length of allocated storage */
        size_t  elem_size;              /**< size of one element */
        struct _slist_node_t{
                void *mem;
                struct _slist_node_t *next;
        }*head;
        void    *mem;                   /**< pointer to the allocated storage */

        /* member functions */
        void    *(*alloc) (size_t);     /**< allocate storage for one element */
        int     (*dealloc) (void *);    /**< deallocate one element */
        void    *(*copy) (void *, \
                const void *, size_t);  /**< copy one element to another */
        int     (*cmp) (const void *, \
                const void *, size_t);  /**< compare two elements */
        int     (*print) (const void *);/**< print one element */
};



//#ifdef __cplusplus
//}
//#endif

#endif /* end of _STDLIBPATCH_INTERNAL_H_ */
